<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>{$data.title} - 随手拍作品</title>
    <link rel="stylesheet" href="__CSS__/global.css" />
    <link rel="stylesheet" href="__CSS__/suishoupai.css" />
    <link rel="stylesheet" href="__CSS__/yf.css" />
    <link rel="stylesheet" type="text/css" href="__COMMJS__/yf_photo/photo.css" />
    <Admintemplate file="Home/Public/global_js"/>
    <script src="__JS__/jquery.min.js"></script>
</head>

<body>

<div class="b-page">
    <include file="Public:header" />

<div class="b-body l-center">

    <div class="b-popDetail__body">
        <div class="b-popDetail__left">
            <div class="b-zuopinTitle" style="padding-top:10px;">{$data.title}</div>
            
            <div class="b-zuopinPic yf-img" data-img="{$data.thumb}" data-thumb="{$data.pic}" data-title="{$data.title}">
            	<!--<img src="__FILESURL__{$data.image}"/>-->
            	<div style="width: 600px;height: 400px;background-image: url(__FILESURL__{$data.image});background-repreat: no-repreat;background-position: center;background-size: cover;"></div>
            	<div class="yf-view">
            		<span class="yf-view-img"></span>
            		<span class="yf-view-span">{$data.pic_num}&nbsp;张图片</span>
            	</div>
            </div>
			<div class="b-zuopinInfo" style="margin-top:12px; height:40px; position:relative;">
                <img src="__IMAGES__/icon_quanzi_view.png" class="pic_mid"><span>浏览{$data.clicknum}次</span>
                <span class="b-zuopinInfo__line">|</span>
              	 <i class="b-messageIcon pic_mid"></i><span>{$data.msgnum|getNullNum}</span>
                <span class="b-zuopinInfo__line">|</span>
                <div id="bd-share"><i class="b-fenxiangIcon pic_mid"></i>分享
                    <!-- bd-sharing begin -->
                    <div class="bdsharebuttonbox bd-share-code">
                        <a href="#" rel="nofollow" class="bds_tsina" data-cmd="tsina" title="分享到新浪微博"></a>
                        <a href="#" rel="nofollow" class="bds_douban" data-cmd="douban" title="分享到豆瓣网"></a>
                        <a href="#" rel="nofollow" class="bds_qzone" data-cmd="qzone" title="分享到QQ空间"></a>
                        <a href="#" rel="nofollow" class="bds_duitang" data-cmd="duitang" title="分享到堆糖"></a>
                        <a href="#" rel="nofollow" class="bds_huaban" data-cmd="huaban" title="分享到花瓣"></a>
                        <a href="#" rel="nofollow" class="bds_weixin" data-cmd="weixin" title="分享到微信"></a>
                    </div>
                    <script>
                        window._bd_share_main = undefined;
                        window._bd_share_config = {
                            common : {
                                bdText : '{$data.title}',
                                bdDesc : '{$data.content|str_cut=50}',
                                bdUrl : '__WEBURL__/works/{$data.workid}',
                                bdPic : '__FILESURL__{$data.image}'
                            },
                            share : {
                                "bdSize" : 24
                            }
                        }
                        with(document)0[(getElementsByTagName('head')[0]||body).appendChild(createElement('script')).src='http://bdimg.share.baidu.com/static/api/js/share.js?cdnversion='+~(-new Date()/36e5)];
                    </script>
                </div>
                <!-- bd-sharing end -->
				
				<if condition="$result eq ''">
					<a data-url="suipai/praise/" class="n-spi-bin R_ajax_trip" data-info="infoid,{$data.id}">点赞</a>
				<else/>
					<a class="n-spi-bin huis">点赞</a>
				</if>
				
            </div>

            <div class="b-zuopinJianjie">
                <div class="b-zuopinTitle">简介</div>
                <div class="b-zuopinJianjie__text">
                    {$data.content|nl2br}
                </div>
            </div>
			<div class="b-zuopinUpload">
				<a href="__WEBURL__/u/{$data.openuid}" class="b-zuopinUpload__pic">
                    <img class="l-full" src="{$data.uavatar|getUavatar}" alt="">
                </a>
				<div class="b-zuopinUpload__name">
                    <a href="__WEBURL__/u/{$data.openuid}">{$data.nickname}</a>
                    <if condition="$data.ifrz eq 1">
                   		<i class="b-renzhengIcon pic_mid"></i>
                    </if>
                </div>
				 <div class="b-zuopinUpload__title">
                    <span>{$data.title}</span>
                </div>
				<a href="__WEBURL__/user/bake/suipaiadd" class="b-zuopinUpload__btn"><img src="__IMAGES__/ssp_photo.png" class="pic_mid" style="margin-right:10px;" alt="">上传作品</a>
			</div>
			<div class="b-zuopinView" style="margin:40px 0 20px 0;">
                <div class="b-popLeftZan__title">{$digCount}个赞</div>
                <div class="b-zuopinView__list">
                    <foreach name="diglist" item="dl">
                        <a href="__WEBURL__/u/{$dl.openuid}" class="b-zuopinView__item">
                            <img class="l-full" src="{$dl.uavatar|getUavatar}" alt="">
                            
                        </a>
                    </foreach>
					<div class="clear"></div>
                </div>
            </div>
			<div class="g-bbs">
					<h2 class="g-bbs-ti">{$data.title}的评论({$msgcount}个)</h2>
					<div class="b-zyn">
					  <if condition="$userid neq ''">
						<a href="__WEBURL__/u/{$userinfo.openuid}" class="b-zyn__pic">
							<img class="l-full" src="{$userinfo.uavatar|getUavatar}" alt="">
						</a>
					   <else/>
						<a href="javascript:void(0);" class="b-zyn__pic">
							<img class="l-full" src="/static/home/images/default_touxiang.jpg" alt="">
						</a>
					   </if>					   
					   	<form onSubmit="return false">
							<textarea name="content" id="content" cols="30" title="评论至少3个字! " required data-len="3" rows="10" class="b-texte"></textarea>
							 <input type="hidden" id="infoid" value="{$data.id}"/>
                   			 <input type="hidden" id="msgType" value="4"/>
							<button class="b-btn" id="sendMsg_btn" >评论</button>
						</form>
	
					</div>
					<div class="g-bbs-div">
						<include file="Public:msglist" />
					</div>
					
				</div>
            


           
            
			
			
			
			
			
			
			
			
            

        </div>
        <div class="b-popDetail__right">
            <div class="b-popRightUser">
                <a href="__WEBURL__/u/{$data.openuid}" class="b-popRightUser__pic"><img src="{$data.uavatar|getUavatar}"><i class="b-picMask"></i></a>
                <a href="__WEBURL__/u/{$data.openuid}" class="b-popRightUser__name">{$data.nickname}的烘焙圈</a>
                <if condition="$data.ifrz eq 1">
                <a href="__WEBURL__/us/renzheng.html"><i class="b-renzhengIcon pic_mid"></i></a>
                </if>
                <div class="b-popRightUser__info">
                    <a href="__WEBURL__/u/{$data.openuid}/fans">{$fansnum}</a><span>人关注</span>
                    <span class="b-popRightUser__line">|</span>
                    <a href="__WEBURL__/u/{$data.openuid}/works">{$hbworksnum}</a><span>个烘焙作品</span>
                    <span class="b-popRightUser__line">|</span>
                    <a href="__WEBURL__/u/{$data.openuid}/suipai">{$spworksnum}</a><span>个随拍作品</span>
                </div>
            </div>
            <if condition="$isfans gt 0">
                <a class="b-popRightGuanzhu R_ajax_trip" data-info="userid,{$data.userid}" data-url="do/cancelfans/">取消关注</a>
                <else/>
            <a class="b-popRightGuanzhu R_ajax_trip" data-info="userid,{$data.userid}" data-url="do/addfans/">关注</a>
            </if>

            <div class="b-popOtherZuopin">
                <div class="b-popOtherZuopin__top">
                    <span class="b-popOtherZuopin__desc">{$data.nickname}的其它随拍作品</span>
                    <a href="__WEBURL__/u/{$data.openuid}/suipai" class="b-popOtherZuopin__all">查看全部</a>
                </div>
                <div class="b-popOtherZuopin__list">
                    <foreach name="moresp" item="ms">
                        <a href="__WEBURL__/suipai/{$ms.id}" class="b-popOtherZuopin__item" style="{$key%3==2?'margin-right:0px;':''}"><img class="l-full" src="__FILESURL__{$ms.image}"></a>
                    </foreach>
                </div>
            </div>
            

        </div>
    </div>


</div>

<include file="Public:footer" />

</div>
<div id="yf-show"></div>
<script src="__JS__/index.js"></script>
<script src="__JS__/jquery.common.js?v=20150101"></script>
<script src="__JS__/jquery.doajax.js"></script>
<script src="__COMMJS__/yf_photo/photo.js"></script>
<script>
    $(document).ready(function() {
        $("#bd-share").mouseover(function (e) {
            e.preventDefault();
            $(".bd-share-code").slideDown(500);
        });
        $(".bd-share-code").mouseleave(function () {
            $(this).slideUp(500);
        });

   /*     var img = $('.b-zuopinPic img');
        var realHeight;//真实的高度
        $("<img/>").attr("src", $(img).attr("src")).load(function() {
            realHeight = this.height;
            if(realHeight>400){
                var margintop=(realHeight-400)/2;
                img.css('marginTop','-'+margintop+'px');
            }
            $('.b-zuopinPic').on('click', function () {
                var obj = $(this);
                if (obj.hasClass('act')) {
                    obj.animate({height: '400px'}, function () {
                        obj.removeClass('act');
                    });
                    $('.b-zuopinPic img').animate({marginTop:'-'+margintop+'px'})
                } else {
                    obj.animate({height: realHeight + 'px'}, function () {
                        obj.addClass('act');
                    });
                    $('.b-zuopinPic img').animate({marginTop:'0px'});
                }
            });


        });*/
        $('.yf-img').yf_photo();

    })
</script>
</body>
</html>